import RPi.GPIO as gpio
import time 

def init():
    gpio.setwarnings(False)
    gpio.setmode(gpio.BOARD)
    gpio.setup(11, gpio.IN)
    pass

def chk_human():
   for i in range(1, 31):
       if gpio.input(11) == True:
           print(time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))+"  Someone is closing!")
       else:
           print("not one there")
       time.sleep(6)


if __name__ == "__main__":
    time.sleep(2)
    init()
    chk_human()
    gpio.cleanup()
    print("clean up")

